<?php
namespace app\web\validate;

use app\common\validate\Base;

class Project extends Base
{
    // 定义验证规则
    protected $rule = [
        'category_id'  => 'require',
        'position_name'  => 'require',
        'project_name|项目名称'  => 'require|max:20',
        'service_time|服务时长'  => 'require|integer|gt:0',
        'money|项目金额'  => 'require|money|gt:0',
        'project_desc|项目介绍'  => 'require|max:1000',
        'image|项目图片' => 'require'
    ];
    protected $message = [
        'category_id' => '请选择项目分类',
        'position_name' => '请选服务部位',
        'money.money' => '项目金额最大两位小数',
    ];
}
